<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib uri= "http://java.sun.com/jsp/jstl/core" prefix= "c" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>编辑通栏广告内容</title>

<link href="${pageContext.request.contextPath }/admin/login/css/mainstyle.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath }/admin/login/css/common.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="${pageContext.request.contextPath }/admin/login/js/common.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/admin/login/js/fullcolad_form.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/util/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath }/util/js/common.js"></script>

</head>
<body>
  <div class="rrcc" id="RightBox">
    <div class="right" id="li010">
      <div class="right01"><img src="${pageContext.request.contextPath }/admin/login/images/main/04.gif" /> 通栏广告内容管理 &gt; <span>编辑通栏广告内容</span></div>
      
      <div class="primary">
        <table>
          <tr>
            <th>编辑通栏广告内容</th>
            <th></th>
          </tr>
        </table>
        <br/>
        
        <form action="${pageContext.request.contextPath }/admin/ad/fullColAdEdit.do?m=edit" 
          enctype="multipart/form-data" method="post" name="fullcoladForm" id="fullcoladForm">
        <input type="hidden" name="id" value="${fullColAdDetail.id }" />
        <table>
          <tr>
            <td width="180px" align="right">广告名称:</td>
            <td>
              <textarea name="adName" id="adName" rows="3" cols="60"
                onfocus="adNameFocus('adNameCol', 'adNameDesc')"
                onblur="adNameBlur(this, 'adNameCol', 'adNameDesc')" 
              >${fullColAdDetail.adName }</textarea>
            </td>
            <td><font color="red">*</font></td>
            <td id="adNameCol">
              <span id="adNameDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr>
            <td width="180px" align="right">广告提示语:</td>
            <td>
              <textarea name="altInfo" id="altInfo" rows="3" cols="60"
                onfocus="altInfoFocus('altInfoCol', 'altInfoDesc')"
                onblur="altInfoBlur(this, 'altInfoCol', 'altInfoDesc')" 
              >${fullColAdDetail.altInfo }</textarea>
            </td>
            <td></td>
            <td id="altInfoCol">
              <span id="altInfoDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">广告正文:</td>
            <td>
              <textarea name="adContent" id="adContent" rows="50" cols="60"
                onfocus="adContentFocus('adContentCol', 'adContentDesc')"
              >${fullColAdDetail.adContent }</textarea>
              <script type="text/javascript">
                CKEDITOR.replace("adContent", {toolbar:"MyNormal1"});
              </script>
            </td>
            <td><font color="red">*</font></td>
            <td id="adContentCol">
              <span id="adContentDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">通栏广告图片:</td>
            <td>
              <%--
              <img alt="${fullColAdDetail.altInfo }" 
                   src="${pageContext.request.contextPath }/admin/ad/img.do?m=getImg&id=${fullColAdDetail.id}"
                   />
               --%>
              <img id="showImgId" title="${fullColAdDetail.altInfo }" 
                src="${pageContext.request.contextPath }/resource/uploadimg/${fullColAdDetail.srcUrl}"
                onload="imgLoadDeal(this)" />
            </td>
            <td></td>
            <td></td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">变更通栏广告图片:</td>
            <td>
              <input type="file" name="adImgFile" id="adImgFile" onclick="adImgFileFocus('adImgFileCol', 'adImgFileDesc')" />
            </td>
            <td></td>
            <td id="adImgFileCol">
              <span id="adImgFileDesc" style="display: none"></span>
            </td>
          </tr>
          
          <tr height="5px"><td></td><td></td><td></td></tr>
          <tr>
            <td width="80px" align="right">内容状态:</td>
            <td>
              <select name="status">
                <option value="0" <c:if test="${fullColAdDetail.status eq 0 }">selected</c:if>>草稿</option>
                <option value="1" <c:if test="${fullColAdDetail.status eq 1 }">selected</c:if>>发布</option>
              </select>
            </td>
            <td><font color="red">*</font></td>
            <td></td>
          </tr>
          
          <tr height="15px"><td></td><td></td><td></td></tr>
          <tr>
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr>
            <td></td>
            <td>
              <input type="button" value="保存" onclick="editFullColAdFun()" />
            </td>
            <td></td>
          </tr>
        </table>
        </form>
      </div>
      
    </div>
  </div>
</body>
</html>